using System.ComponentModel;

namespace Lib.Helper
{
    public abstract class ViewModelBase : INotifyPropertyChanged
    {
        public ViewModelBase()
        {
            
        } 
        
        public event PropertyChangedEventHandler PropertyChanged;
        public static  event PropertyChangedEventHandler PropertyChanged2;

        protected void FirePropertyChanged(string propertyname)
        {
            var handler = PropertyChanged; 
            if (handler != null)             
                handler(this, new PropertyChangedEventArgs(propertyname));
        }

        protected static void FirePropertyChanged2(string propertyname)
        {
            var handler = PropertyChanged2;
            if (handler != null)
                handler(new object(), new PropertyChangedEventArgs(propertyname));
        }
    }
}
